package com.aidex.biz.domain;

import com.aidex.common.annotation.Excel;
import com.aidex.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 产品信息对象 biz_product_info
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-06-13
 */
@Data
public class ProductInfo extends BaseEntity<ProductInfo>
{
    private static final long serialVersionUID = 1L;


    /** 产品类型 0 洗护 1 商城 */
    @Excel(name = "产品类型 0 洗护 1 商城")
    private Integer type;

    /** 类型ID */
    @Excel(name = "类型ID")
    private String rubbishTypeId;

    private String rubbishTypeName;

    /** 主图图片 */
    private String indexImg;

    /** 产品标题 */
    private String title;

    /** 商户名称 */
    private String companyName;

    /** 详情图片 */
    private String detailsInfo;

    /** 品牌名称 */
    private String brand;

    /** 是否预售 */
    private Integer isYushou;

    /** 七天无理由 */
    private Integer isSevenDay;

    /** 已售数量 */
    private Integer outCount;

    /** 预售时间 */
    private Date yushouTime;

    /** 时间开始 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginMiaoshaTime;

    /** 时间结束 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endMiaoshaTime;
    /** 关键字 */
    private String keyWord;

    /** 排序 */
    private Integer sort;

    /** 状态（0正常 1 停用） */
    @NotBlank(message = "状态（0正常 1 停用）不允许为空")
    private String status;
    /**
     * 首页是否显示 0 显示 1 不显示
     */
    private Integer showIndex;
    /**
     * 是否秒杀 0 不秒杀 1 秒杀
     */
    private Integer isMiaosha;
    /**
     * 首单优惠 0 不优惠 1优惠
     */
    private Integer isFirst;

    private BigDecimal miaoshaPrice;
    private BigDecimal firstPrice;




    /**
     * 单价起
     * @param
     */
    private BigDecimal priceStart;


    /**
     * 副标题
     */
    private String fuTitle;
    /**
     * 洗护范围
     */
    private String xihuScope;
    /**
     * 洗护时效
     */
    private String xihuTimes;
    /**
     * 清洗工艺
     */
    private String xihuTechnology;

    /**
     * sku 列表
     */
    private List<ProductSku> productSkuList;

    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }

    public void setRubbishTypeId(String rubbishTypeId) 
    {
        this.rubbishTypeId = rubbishTypeId;
    }

    public String getRubbishTypeId() 
    {
        return rubbishTypeId;
    }

    public void setIndexImg(String indexImg) 
    {
        this.indexImg = indexImg;
    }

    public String getIndexImg() 
    {
        return indexImg;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setCompanyName(String companyName) 
    {
        this.companyName = companyName;
    }

    public String getCompanyName() 
    {
        return companyName;
    }

    public void setDetailsInfo(String detailsInfo) 
    {
        this.detailsInfo = detailsInfo;
    }

    public String getDetailsInfo() 
    {
        return detailsInfo;
    }

    public void setBrand(String brand) 
    {
        this.brand = brand;
    }

    public String getBrand() 
    {
        return brand;
    }

    public void setIsYushou(Integer isYushou) 
    {
        this.isYushou = isYushou;
    }

    public Integer getIsYushou() 
    {
        return isYushou;
    }

    public void setIsSevenDay(Integer isSevenDay) 
    {
        this.isSevenDay = isSevenDay;
    }

    public Integer getIsSevenDay() 
    {
        return isSevenDay;
    }

    public void setOutCount(Integer outCount) 
    {
        this.outCount = outCount;
    }

    public Integer getOutCount() 
    {
        return outCount;
    }

    public void setYushouTime(Date yushouTime) 
    {
        this.yushouTime = yushouTime;
    }

    public Date getYushouTime() 
    {
        return yushouTime;
    }

    public void setKeyWord(String keyWord) 
    {
        this.keyWord = keyWord;
    }

    public String getKeyWord() 
    {
        return keyWord;
    }

    public void setSort(Integer sort) 
    {
        this.sort = sort;
    }

    public Integer getSort() 
    {
        return sort;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("deptId", getDeptId())
            .append("userName", getUserName())
            .append("deptName", getDeptName())
            .append("companyId", getCompanyId())
            .append("type", getType())
            .append("rubbishTypeId", getRubbishTypeId())
            .append("indexImg", getIndexImg())
            .append("title", getTitle())
            .append("companyName", getCompanyName())
            .append("detailsInfo", getDetailsInfo())
            .append("brand", getBrand())
            .append("isYushou", getIsYushou())
            .append("isSevenDay", getIsSevenDay())
            .append("outCount", getOutCount())
            .append("yushouTime", getYushouTime())
            .append("keyWord", getKeyWord())
            .append("sort", getSort())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
